package com.yuewen.mall.common.mallcacher;

import com.google.gson.reflect.TypeToken;
import com.yuewen.mall.common.redisclient.RedisClient;
import com.yuewenmall.common.baseentities.common.ResponseInfo;
import com.yuewenmall.common.baseentities.common.config.RedisServerConfig;
import com.yuewenmall.common.baseentities.enumerate.ConfigFileNames;
import com.yuewenmall.common.baseentities.product.dbentityimpl.ProductInfo;
import com.yuewenmall.common.baseentities.product.dbentityimpl.ProductSetInfo;
import com.yuewenmall.common.baseentities.recommend.ResponseData.ResponseDataWithGetItemsAndGroupsBySpotId;
import com.yuewenmall.common.baseentities.recommend.dbentityimpl.CustomBlockInfo;
import com.yuewenmall.common.baseentities.recommend.dbentityimpl.RecommendGroupInfo;
import com.yuewenmall.common.baseentities.recommend.dbentityimpl.RecommendItemInfo;
import com.yuewenmall.common.baseentities.recommend.dbentityimpl.SpotsInfo;
import com.yuewenmall.common.utilities.ConfigUtility;
import com.yuewenmall.common.utilities.FileUtility;
import com.yuewenmall.common.utilities.JsonUtility;
import com.yuewenmall.common.utilities.ValidatorUtility;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by liwei.b on 2016/6/25.
 */
public class RecommendationCacheManager extends CommonCacherManager {

    public static RecommendationCacheManager Instance = null;

    static {
        Instance = new RecommendationCacheManager();
    }

    private RecommendationCacheManager() {
    }

    public Object getBigEyesBySpotId(BigInteger spotId) {
        String key = RecommendationCacheKeyManager.getBigEyesBySpotIdCacheKey(spotId);
        return redisClient.get(key);
    }

    public String updateGetBigEyesBySpotId(BigInteger spotId, Object value) {
        String key = RecommendationCacheKeyManager.getBigEyesBySpotIdCacheKey(spotId);
        return redisClient.setObject(key, value, RecommendationCacheKeyManager.getBigEyesBySpotIdCacheKeyTimeout());
    }
}
